Lecture 15 — kicking off Unit VI by exploring the critical role of software testing in DevOps, understanding the difference between Verification and Validation, and breaking down testing types from White-box to Automated.
"If you automate a mess, you get an automated mess." — DevOps Proverb
In a Continuous Deployment pipeline, there is no manual gatekeeper. If code merges to main, it goes to production. The only thing stopping a critical bug from destroying the production database is the automated test suite. High-velocity deployments require absolute trust in your testing.
QA team tests the software right before release. Bugs are expensive to fix because code is already written.
Move testing to the "left" (earlier) in the lifecycle. Developers write and run tests as they code.
Developers should know within 5 minutes of a commit if they broke something, not 5 weeks later.
Analogy: Verification checks if the car's engine works perfectly. Validation checks if a car is actually what the customer wanted, or if they needed a boat.
| Feature | White-box Testing (Clear Box) | Black-box Testing (Opaque Box) |
|---|---|---|
| Definition | Testing internal structures or workings of an application. | Testing functionality without looking at internal structures. |
| Knowledge Required | Tester must know programming and the internal codebase. | Tester only needs to know the expected inputs and outputs. |
| Performed By | Usually done by Developers. | Usually done by QA Engineers / Users. |
| Focus | Code coverage, branches, paths, logic flow. | UI, usability, business rules, edge case inputs. |
| Examples | Unit tests (JUnit, Jest), Static Analysis. | E2E tests (Selenium), User Acceptance Testing. |
A combination of White-box and Black-box testing. The tester has partial knowledge of the internal structure (like database schemas or API architectures) and uses that knowledge to design better black-box tests.
You test the application via its UI (Black-box), but because you know the backend database structure (White-box), you intentionally input data that you know might break a specific SQL query (SQL Injection testing).
The DevOps Mandate: Automate everything you can (regression, unit, integration), so humans can spend their manual testing time on creative, exploratory testing where human intelligence is actually needed.
Introduced by Mike Cohn, the pyramid visualizes how a healthy automated testing portfolio should be structured.
Anti-Pattern: The Ice Cream Cone. Many legacy companies have an inverted pyramid — tons of slow, manual E2E tests, and very few fast unit tests. This kills CI/CD velocity.
| Test Type | Objective | Tools Example |
|---|---|---|
| Performance Testing | Checks how fast the system responds under normal workload. | JMeter, Gatling |
| Load Testing | Checks system behavior under expected peak load (e.g., Black Friday traffic). | Locust, k6 |
| Stress Testing | Pushes the system beyond limits to see how it fails and recovers. | Chaos Monkey, Gremlin |
| Security Testing (SAST/DAST) | Finds vulnerabilities, SQL injections, and weak encryption. | SonarQube, OWASP ZAP |
| Usability Testing | Evaluates how user-friendly and intuitive the interface is. | Hotjar, UserTesting |
Software build process; Test case writing; Automation testing tools in-depth; Manual vs Automated Deployment; IBM Case Study part 2.
We will look closely at tools like Selenium and Cypress. Think about a repetitive task on a website you'd like to automate.